/**
 * Copyright  2011 Nokia Corporation.
 *
 */


#include <QtGui/QApplication>
#include <QPaintEngine>

#ifdef Q_OS_SYMBIAN
#include <eikenv.h>
#include <eikappui.h>
#include <aknenv.h>
#include <aknappui.h>
#endif

#include "GameWindow.h"
#include "QtTileGameEngine.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // Lock orientation to landscape
#ifdef Q_OS_SYMBIAN
    CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
    TRAPD(error,
          if (appUi) {
          appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
}
);
#endif

GE::GameWindow* theGameWindow = new QtTileGameEngine;
theGameWindow->create();
theGameWindow->setWindowState(Qt::WindowNoState);

qApp->installEventFilter(theGameWindow);

#ifdef Q_OS_WIN32
//theGameWindow->showMaximized();
theGameWindow->setGeometry(0,0,360,640 );
theGameWindow->show();
#else
theGameWindow->showFullScreen();
#endif

int result = a.exec();
theGameWindow->destroy();
delete theGameWindow;
return result;
}

